package com.cardone.platform.usercenter.service;

import java.util.List;

import lombok.Getter;
import lombok.Setter;

import com.cardone.common.dto.PaginationDto;
import com.cardone.context.ContextHolder;
import com.cardone.platform.usercenter.dao.UsDepartmentTranslateDao;
import com.cardone.platform.usercenter.dto.UsDepartmentTranslateDto;

/**
 * 用户部门调动服务
 *
 * @author yaohaitao
 *
 */
@Getter
@Setter
public class UsDepartmentTranslateDefaultService implements UsDepartmentTranslateService {
	@Override
	public int deleteByIds(final UsDepartmentTranslateDto deleteUsDepartmentTranslate) {
		return ContextHolder.getBean(UsDepartmentTranslateDao.class).deleteByIds(deleteUsDepartmentTranslate);
	}

	@Override
	public <P> P findByCodeOrId(final Class<P> mappedClass, final UsDepartmentTranslateDto findUsDepartmentTranslate) {
		return ContextHolder.getBean(UsDepartmentTranslateDao.class).findByCodeOrId(mappedClass, findUsDepartmentTranslate);
	}

	@Override
	public <P> P findById(final Class<P> mappedClass, final UsDepartmentTranslateDto findUsDepartmentTranslate) {
		return ContextHolder.getBean(UsDepartmentTranslateDao.class).findById(mappedClass, findUsDepartmentTranslate);
	}

	@Override
	public <P> List<P> findListByLikeCode(final Class<P> mappedClass, final UsDepartmentTranslateDto findListUsDepartmentTranslate) {
		return ContextHolder.getBean(UsDepartmentTranslateDao.class).findListByLikeCode(mappedClass, findListUsDepartmentTranslate);
	}

	@Override
	public int insertByCode(final UsDepartmentTranslateDto insertUsDepartmentTranslate) {
		return ContextHolder.getBean(UsDepartmentTranslateDao.class).insertByCode(insertUsDepartmentTranslate);
	}

	@Override
	public <P> PaginationDto<P> paginationByLikeCode(final Class<P> mappedClass, final UsDepartmentTranslateDto paginationUsDepartmentTranslate) {
		return ContextHolder.getBean(UsDepartmentTranslateDao.class).paginationByLikeCode(mappedClass, paginationUsDepartmentTranslate);
	}

	@Override
	public Integer readByCodeNqIdForCount(final UsDepartmentTranslateDto readUsDepartmentTranslate) {
		return ContextHolder.getBean(UsDepartmentTranslateDao.class).readByCodeNqIdForCount(readUsDepartmentTranslate);
	}

	@Override
	public <P> P saveByIdOrCode(final Class<P> mappedClass, final UsDepartmentTranslateDto saveUsDepartmentTranslate) {
		return ContextHolder.getBean(UsDepartmentTranslateDao.class).saveByIdOrCode(mappedClass, saveUsDepartmentTranslate);
	}

	@Override
	public int updateByCode(final UsDepartmentTranslateDto updateUsDepartmentTranslate) {
		return ContextHolder.getBean(UsDepartmentTranslateDao.class).updateByCode(updateUsDepartmentTranslate);
	}
}